-- GENERATED SPELL FOR [Proximity Mine] --


function spell0_34362(pUnit, Event) --@Explosion,Self--
pUnit:FullCastSpellOnTarget(63009,pUnit)
pUnit:RegisterEvent('Sorts_34362', 553, 1)
end

function spell1_34362(pUnit, Event) --@Explosion,Self--
pUnit:FullCastSpellOnTarget(66351,pUnit)
pUnit:RegisterEvent('Sorts_34362', 595, 1)
end

function Sorts_34362(pUnit, Event)
local choix_sorts_34362 = math.random(0, 1)
if choix_sorts_34362 == 0 then
pUnit:RegisterEvent('spell0_34362', 1, 1)
end
if choix_sorts_34362 == 1 then
pUnit:RegisterEvent('spell1_34362', 1, 1)
end
end

function mob34362_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34362', math.random(1500, 3000), 1)
end

function mob34362_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34362_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34362_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34362, 1, 'mob34362_Action')
RegisterUnitEvent(34362, 2, 'mob34362_Leave')
RegisterUnitEvent(34362, 3, 'mob34362_Kill')
RegisterUnitEvent(34362, 4, 'mob34362_Die')
